function myajax({type='get',data={},url}){
    return new Promise((resolve,reject)=>{
        $.ajax({
            type,
            url,
            data,
            success(res){
                resolve([null,res])
            },
            error(err){
                resolve([err,undefined])
            }
        })
    })
}